Load ResetTabs,OBJEPanes

! -------------- Start Template -----------------
#path=@FILE
#form=@FILE.FORM
#title=@FILE.TITL

GoSub ResetTabs,0
GoSub OBJEPanes,"Zoom"

newline
if #form="url"
  tab 1
  cell Multimedia
  set width -1 font "Hyperlink Text"
  set url #path width -1 font "Hyperlink Text"
  if #title<>""
    text #title
  else
    text #path
  endif
  set objectImage @this imageposition left
  sizetofit -1

  set alignment left height #imageHeight$
  set help local("Click to open this URL link in your browser application.") 
else
  newline

  if #zoom>1
    DisplayWidth #zoom*#rightMargin$
    #width=#rightMargin$-#leftSkip-#rightSkip
  else
    #width=#zoom*#rightMargin$-#leftSkip-#rightSkip
  endif

  cell Multimedia
  #padding=5
  set objectFull @this mmFormat #form width #width
  set imageposition imageonly 
  #mmRatio=#imageHeight$/#imageWidth$
  #posWidth=#cellWidth$-2*#padding
  set imagewidth #posWidth
  set height #mmRatio*#posWidth+2*#padding

  ! handle non-image objects
  if #imageType$="noimage"
    if #appName$="GEDitCOM II"
      set text local("No image representation. Click to open in another application")
      help local("Click to open in a helper application.")
      help " "&local("You can configure which application opens each type of multimedia object.")
    else
      set text local("No image representation for this multimedia object.")
    endif
    set font "Static Text" imageposition left alignment left
  else if #imageType$="nopermission"
    set text local("You do not have permission to view this multimedia object.")
    set font "Static Text" imageposition left alignment left
  else if #imageType$="notfound"
    set text local("Multimedia file not found (click to fix)")
    set font "Static Text" imageposition left alignment left
    set MenuLink "Attach Multimedia"
	help local("Click to link this record to a multimedia object.")
  else if #imageType$="image"
    set target "none"
    if #appName$="GEDitCOM II"
      help local("Use the Zoom menu to change image scaling.")
	endif
  else
    ! thumbnail
    help local("The file for this image was not found.")
    help " "&local("This image is a thumbnail that was generated when it was available.")
    set ScriptLink "Thumbnail.gcscpt" ScriptType format
  endif
endif

hideexcess
